package com.naiterui.ehp.bp.domain;

// default package

import static javax.persistence.GenerationType.IDENTITY;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * DocPatientGroup entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "patient_record")
public class PatientRecord implements Serializable {

    /**
     * 备注用户--患者：<code>RECORD_TYPE_PATIENT</code>
     */
    public static final int RECORD_TYPE_PATIENT = 1;

    /**
     * 备注用户--手机联系人：<code>RECORD_TYPE_CONTACTS</code>
     */
    public static final int RECORD_TYPE_CONTACTS = 2;

    public static final int VERSION = 0;

    public static final int NO = 0; // 不跑索引
    public static final int WAIT = 1; // 待处理
    public static final int ING = 2;  // 处理中
    public static final int FINISH = 3; // 处理完成

    /**
     * 
     */
    private static final long serialVersionUID = 5958718857822869621L;

    // 主键
    private Long id;
    // uuid
    private String uuid;
    // 患者id或手机联系人id
    private Long patientId;
    // 类型 1：患者；2：手机联系人
    private Integer type;
    // 医生id
    private Long doctorId;
    // 医院id
    private Integer hospitalId;
    // 科室id
    private Integer departmentId;
    // 备注内容
    private String recordContent;
    // 添加时间
    private Date createdAt;

    // 医生姓名
    private String doctorName;
    // 医院
    private String hospital;
    // 科室
    private String department;
    // 修改时间
    private Date changedAt;
    // 创建人
    private String createdBy;
    // 修改人
    private String changedBy;
    // 版本号
    private Integer version;
    // 抓取状态
    private Integer fetchStatus;

    public PatientRecord() {
    }

    public PatientRecord(Long doctorId, Long patientId, Integer type, String content) {
        super();
        this.doctorId = doctorId;
        this.patientId = patientId;
        this.type = type;
        this.recordContent = content;
        this.createdAt = new Date();
    }

    /**
     * id : 主键
     */
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "uuid")
    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    /**
     * doctorId : 医生id
     */
    @Column(name = "doctor_id", nullable = false)
    public Long getDoctorId() {
        return this.doctorId;
    }

    public void setDoctorId(Long doctorId) {
        this.doctorId = doctorId;
    }

    /**
     * @return Integer 取得域 hospitalId 的方法。
     */
    @Column(name = "hospital_id")
    public Integer getHospitalId() {
        return this.hospitalId;
    }

    /**
     * @param hospitalId 对域 hospitalId 的设置方法.
     */
    public void setHospitalId(Integer hospitalId) {
        this.hospitalId = hospitalId;
    }

    /**
     * @return Integer 取得域 departmentId 的方法。
     */
    @Column(name = "department_id")
    public Integer getDepartmentId() {
        return this.departmentId;
    }

    /**
     * @param departmentId 对域 departmentId 的设置方法.
     */
    public void setDepartmentId(Integer departmentId) {
        this.departmentId = departmentId;
    }

    /**
     * record : 病历详情
     */
    @Column(name = "record")
    public String getRecordContent() {
        return this.recordContent;
    }

    public void setRecordContent(String recordContent) {
        this.recordContent = recordContent;
    }

    /**
     * createdAt : 注册时间
     */
    @Column(name = "created_at")
    public Date getCreatedAt() {
        return this.createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    /**
     * patientId : 患者id
     */
    @Column(name = "patient_id", nullable = false)
    public Long getPatientId() {
        return this.patientId;
    }

    public void setPatientId(Long patientId) {
        this.patientId = patientId;
    }

    /**
     * @return Integer 取得域 type 的方法。
     */
    @Column(name = "type", nullable = false)
    public Integer getType() {
        return this.type;
    }

    /**
     * @param type 对域 type 的设置方法.
     */
    public void setType(Integer type) {
        this.type = type;
    }

    @Column(name = "doctor_name")
    public String getDoctorName() {
        return doctorName;
    }

    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }

    @Column(name = "hospital")
    public String getHospital() {
        return hospital;
    }

    public void setHospital(String hospital) {
        this.hospital = hospital;
    }

    @Column(name = "department")
    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    @Column(name = "changed_at")
    public Date getChangedAt() {
        return changedAt;
    }

    public void setChangedAt(Date changedAt) {
        this.changedAt = changedAt;
    }

    @Column(name = "created_by")
    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    @Column(name = "changed_by")
    public String getChangedBy() {
        return changedBy;
    }

    public void setChangedBy(String changedBy) {
        this.changedBy = changedBy;
    }

    @Column(name = "version")
    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    @Column(name = "fetch_status")
    public Integer getFetchStatus() {
        return fetchStatus;
    }

    public void setFetchStatus(Integer fetchStatus) {
        this.fetchStatus = fetchStatus;
    }

}
